package com.tebiecloud.mpweixin.client.service;

import com.tebiecloud.common.model.ResultBody;
import com.tebiecloud.mpweixin.client.model.entity.MpminiUser;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 微信小程序接口
 * @Author: tebie
 * @Date: 2019-09-24 17:06
 */
public interface IMpminiApiServiceClient {

    /**
     * 小程序授权
     * @param code
     * @return
     */
    @PostMapping("/feign/mpminiapi/infoMpminiUser")
    ResultBody<MpminiUser> getMpminiUser(
                    @RequestParam(value = "nickame",required = false) String nickName,
                    @RequestParam(value = "avatarUrl",required = false) String avatarUrl,
                    @RequestParam("code") String code);

    /**
     * 获取小程序用户信息
     * @param openid
     * @return
     */
    @PostMapping("/feign/mpminiapi/getMpminiUserByOpenid")
    ResultBody<MpminiUser> getMpminiUserByOpenid(
            @RequestParam(value = "openid") String openid);

}
